#pragma once

#include "..\Common\Plugin.h"

using FIND_DATA = WIN32_FIND_DATAW;

namespace CF
{

class CCbWrapper
{
public:
	CCbWrapper(const CF_CALLBACK_INFO *pCallbackInfo);

	INT64 GetTransferKey() const { return m_transferKey.QuadPart; }
	void ReportProgress(const std::wstring& strFileName, INT64 nTotal, INT64 nCompleted);
	void TransferData(const std::wstring& strFileName, const BufferPtr& pBuffer, INT64 nOffset, INT64 nLength);
	void TransferPlaceholders(const std::wstring& strPathName, bool bError, const std::vector<FileInfo>& vecFileInfos);

private:
	CF_CONNECTION_KEY m_connectionKey;
	CF_TRANSFER_KEY   m_transferKey;
};

void CreatePlaceholders(const std::wstring& strPathName, const std::vector<FileInfo>& vecFileInfos);
void UpdatePlaceholder(const std::wstring& strPathName, const FIND_DATA& localInfo, const FileInfo& remoteInfo);
std::wstring GetRecycleTempPath();

}	// namespace CF
